module.exports = ctx => ({
  locales: {
    '/': {
      lang: 'zh-CN',
      title: '中小在线',
      description: '文档'
    },
    
  },
  port: '8080',
  plugins: [
    // [
    //   '@vuepress/pwa',
    //   {
    //     serviceWorker: true,
    //     updatePopup: true
    //   }
    // ],
    'vuepress-plugin-demo-container'
  ],
  themeConfig: {
  
    docsDir: 'docs',
    locales: {
      '/': {
        label: '简体中文',
        selectText: '选择语言',
        editLinkText: '在 GitHub 上编辑此页',
        nav: [
          {
            text: 'UI组件库',
            link: '/components/'
          },
          {
            text: '微前端',
            link: '/microfront/'
          },
          {
            text: '服务端渲染',
            link: '/nuxt/'
          }
        ],
        sidebar: {
          '/components/':[
            {
              title: '版本记录',
              collapsable: false,
              children: [
                '/components/version.md',
              ]
            },
            {
              title: '开发指南',
              collapsable: false,
              children: [
                '/components/',
                '/components/quickstart.md',
                '/components/uinorm.md',
             
              ]
            },
            {
              title: '指令',
              collapsable: false,
              children: [
                '/components/directive.md',
              ]
            },
            {
              title: '常用方法',
              collapsable: false,
              children: [
                '/components/http.md',
                '/components/tools.md',
                '/components/validate.md',
                '/components/modal.md',
                '/components/cache.md',
              ]
            },
            {
              title: '容器',
              collapsable: false,
              children: [
                '/components/container.md',
                '/components/dialog.md',
                '/components/handle.md',
                '/components/lrcontainer.md',
                '/components/search.md',
               
             
              ]
            },
            {
              title: '组件',
              collapsable: false,
              children: [
                '/components/button.md',
                '/components/rightToolbar.md',
                '/components/table.md',
                '/components/svgIncon.md',
                '/components/rangeInput.md',
                '/components/pageHeader.md',
                '/components/pagefooter.md',
             
              ]
            },
         
          ],
          '/microfront/':[
            {
              title: '集成',
              collapsable: false,
              children: [
                '/microfront/',
                '/microfront/sub.md',
             
              ]
            },
          ],
          '/nuxt/':[
            {
              title: '部署',
              collapsable: false,
              children: [
                '/nuxt/',
              ]
            },
            {
              title: '开发',
              collapsable: false,
              children: [
                '/nuxt/introduce.md',
                '/nuxt/exploit.md',
              
             
              ]
            },
          ]
        }
      }
    }
  }
})
